package dwarffortress.data;

import dwarffortress.annotations.FixedValue;
import dwarffortress.annotations.SameLengthAsPrevious;

public class DFEntity {
    /**
     * Represents Civilization (0)/Group(1)/Religion(5)/Something else(3) [? eliminated]
     */
    public short f000_kind;
    public int f001_id;
    public String f002_typeRef;

    public short f003_short;

    public short f004_short;

    /**
     * Looks like some id, not sequental, but unique
     * Have numbers similar to unit-NNNNNN.dat in save directory
     */
    public int f005_maybeUnitId;

    /**
     * non-zero only for civilizaions.
     */
    public int f006_int;


    @FixedValue (value = 0, essential = true)
    public short f007_short_zero;

    @FixedValue (value = 1, essential = true)
    public byte f008_byte_one;

    /**
     * Only skulkings have this string != "" 
     */
    public String f009_someName;

    @FixedValue (value = 0,essential = true)
    public short f010_short_zero_maybe_string;

    /**
     * Name is [1][2] the [3]ous [4]ed [5]-[6] of [7]
     * Each element is either -1 or word index
     */
    public int f011_worldNamePart1;
    public int f012_worldNamePart2;
    public int f013_worldNamePart3;
    public int f014_worldNamePart4;
    public int f015_worldNamePart5;
    public int f016_worldNamePart6;
    public int f017_worldNamePart7;

    @FixedValue (value = 0,essential = true)
    public int f018_int_zero;

    public short f019_short; // Values 0 and 2
    public short f020_short; // Values 0 and 2
    public short f021_short; // Values 0 2 3
    public short f022_short; // Values 0 1
    public short f023_short; // Values 0 1 8 - flags?

    public int f024_someIdMaybeCiv;

    public short f025_short;

    public short f026_civilizationCreatureRef;

    public int f027_int; // Values 0 1 2 16 -- flags?

    public short[] f028_short_list;

    public short[] f029_short_list;

    public short[] f030_short_list;

    public short[] f031_short_list;
    @SameLengthAsPrevious
    public short[] f032_short_list;

    @FixedValue (value = 0, essential = true)
    public int f033_int_zero;

    @FixedValue (value = 0, essential = true)
    public int f034_int_zero;


    public short[] f035_short_list;
    @SameLengthAsPrevious
    public short[] f036_short_list;
    
    public short[] f037_short_list;

    public short[] f038_short_list;
    @SameLengthAsPrevious
    public short[] f039_short_list;

    public short[] f040_short_list;
    @SameLengthAsPrevious
    public short[] f041_short_list;

    public short[] f042_short_list;
    @SameLengthAsPrevious
    public short[] f043_short_list;

    public short[] f044_short_list;
    @SameLengthAsPrevious
    public short[] f045_short_list;


    public short[] f046_short_list;
    @SameLengthAsPrevious
    public short[] f047_short_list;

    public short[] f048_short_list_creature_ids;

    public short[] f049_short_list;
    public short[] f050_short_list;
    /*
    Len either 0 or 4
    Some of this 4 elemens will be 'N' ( = 4e 00 )

     */
    public short[] f051_short_list_length_4_with_one_element_N;
    @SameLengthAsPrevious
    public short[] f052_short_list;
    @SameLengthAsPrevious
    public short[] f053_short_list;
    @SameLengthAsPrevious
    public short[] f054_short_list;

    public short[] f055_short_list;

    public short[] f056_short_list;

    public short[] f057_short_list;

    public short[] f058_short_list;

    @FixedValue (value = 0,essential = true)
    public int f059_int_zero;


    public short[] f060_short_list;
    public short[] f061_short_list;
    public short[] f062_short_list;
    public short[] f063_short_list;

    public short[] f064_short_list_with_creature_ids;

    @FixedValue (value = 0, essential = true)
    public int f065_int_zero;
    @FixedValue (value = 0, essential = true)
    public int f066_int_zero;

    public short[] f067_short_list;

    public short[] f068_short_list;

    public short[] f069_short_list;
    @SameLengthAsPrevious
    public short[] f070_short_list;

    @FixedValue (value = -1)
    public short f071_short_ff;
    public short f072_short;

    @FixedValue (value = -1)
    public short f073_short_ff;
    public short f074_short;

    @FixedValue (value = -1)
    public short f075_short_ff;
    public short f076_short;

    public short[] f077_short_list;

    /**
     * Same length for all entities that have same raw_type 
     */
    public short[] f078_short_list;

    /**
     * looks same length for all entities that represent civ and groups within it 
     */
    public short[] f079_short_list;

    public short[] f080_short_list;

    public short[] f081_short_list;

    public short[] f082_short_list;

    public short[] f083_short_list;

    public short[] f084_short_list;

    public short[] f085_short_list;

    public short[] f086_short_list;

    public short[] f087_short_list;

    public short[] f088_short_list;

    public short[] f089_short_list;

    public short[] f090_short_list;
    @SameLengthAsPrevious
    public short[] f091_short_list;
    
    public short[] f092_short_list;
    @SameLengthAsPrevious
    public short[] f093_short_list;

    public short[] f094_short_list;
    @SameLengthAsPrevious
    public short[] f095_short_list;

    public short[] f096_short_list;
    @SameLengthAsPrevious
    public short[] f097_short_list;
    @SameLengthAsPrevious
    public short[] f098_short_list;
    @SameLengthAsPrevious
    public short[] f099_short_list;

    public short[] f100_short_list;
    @SameLengthAsPrevious
    public short[] f101_short_list;

    public short[] f102_short_list;
    @SameLengthAsPrevious
    public short[] f103_short_list;
    @SameLengthAsPrevious
    public int[] f104_int_list;

    /**
     * Size = num of creatures
     */
    public byte[] f105_byte_list;
    @SameLengthAsPrevious
    public byte[] f106_byte_list;
    /**
     * Size = num of plants
     */
    public byte[] f107_byte_list;
    @SameLengthAsPrevious
    public byte[] f108_byte_list;
    /**
     * Size = num of wood?
     */
    public byte[] f109_byte_list;
    /**
     * Size = num of wood? Not same length as prev
     */
    public byte[] f110_byte_list;

    @FixedValue (value = 0,essential = true)
    public int f111_int_zero;
    @FixedValue (value = 0,essential = true)
    public int f112_int_zero;
    public DFUnkStruct01[] f113_structureList;
    public DFUnkStruct01[] f114_structureList;
    public int[] f115_int_list;
    /**
     * Values as in second array before this structure.
     * Seems to be list of units in civ.  
     */
    public int[] f116_listOfSomeRefs;

    /**
     * Always have size 1
     */
    public short[] f117_short_list;
    @SameLengthAsPrevious
    public int[] f118_int_list;
    @SameLengthAsPrevious
    public short[] f119_short_list;
    @SameLengthAsPrevious
    public byte[] f120_byte_list;
    @SameLengthAsPrevious
    public byte[] f121_byte_list;
    @SameLengthAsPrevious
    public byte[] f122_byte_list;
    @SameLengthAsPrevious
    public byte[] f123_byte_list;
    @SameLengthAsPrevious
    public short[] f124_short_list;

    @FixedValue(value =  1, essential = true)
    public int f125_int_one;

    public short f126_short;


    public DFUnkStruct02[] f127_structureList;

    @FixedValue (value = -1)
    public short f128_short;
    @FixedValue (value = -1)
    public int f129_int;
//    public int f130_int;
    public byte f131_byte;
    public byte f132_byte;

    public byte f133_byte;
    public byte f134_byte;
//    public short f135_short;
    @FixedValue (value = -1)
    public short f136_short;
    @FixedValue (value = -1)
    public short f137_short;
    @FixedValue (value = -1)
    public short f138_short;
    @FixedValue (value = -1)
    public short f139_short;
    public int[] f140_int_list;
    public int[] f141_int_list;
    /**
     * Length = 3; values are 0
     */
    public byte[] f142_byte_list;
    public int[] f143_somethingToDoWithWorship;
    @SameLengthAsPrevious
    public int[] f144_somethingToDoWithWorship;
    
    public DFUnkStruct04[] f145_structureList;
    public DFUnkStruct05[] f146_structureList;
    public short f147_short;
    public short[] f148_short_list;
    @SameLengthAsPrevious
    public int[] f149_int_list;
}
